<template>
	<view class="indexs">
		<view class="header header_lan" :style="'padding-top: ' + navH + 'px;'">
			<view class="header_height" :style="'height:' + gaodu + 'px;line-height:' + gaodu + 'px;top:' + gaodutops + 'px;'">
				<view class="index_h_cont3">
					<view class="index_wenben_img" @tap="jumpzuo"><image :src="imgUrl + '/dzx_img22.png'" mode="widthFix"></image></view>
					<view class="index_wenben baise">{{ $t('page_sharing_order_reject.Group_audit') }}</view>
				</view>
			</view>
			<view class="coloe_title">s</view>
		</view>
		<view class="index_center" :style="'padding-top:' + (navH + 50) + 'px;padding-bottom: 120rpx;'">
			<view class="faqipintuan_center">
				<view class="faqipintuan_item1">
					<view class="faqipintuan_item1_list">
						<view class="faqipintuan_item1_cont" style="padding-bottom: 18rpx">
							<view class="faqipintuan_item1_l">
								<image :src="imgUrl + 'dzx_img30.png'"></image>
								<text>{{ $t('page_sharing_order_reject.hint') }}</text>
							</view>
						</view>
						<view class="faqipintuan_item1_txt">
							<textarea
								@input="textInput"
								data-field="reject"
								:placeholder="$t('page_sharing_order_reject.placeholder')"
								name=""
								id=""
								cols="30"
								rows="10"
							></textarea>
						</view>
					</view>
				</view>
				<view class="baoguo_btns" @tap="submit">
					<view class="baoguo_btns_posi">
						<view class="baoguo_btn">{{ $t('page_sharing_order_reject.sure') }}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
const app = getApp();

let request = require('../../utils/require');

export default {
	data() {
		return {
			navH: app.globalData.navHeight,
			gaodu: app.globalData.height,
			imgUrl: app.globalData.imgUrl,
			form: {
				reject: ''
			}
		};
	},
	//滑动显示顶部
	onPageScroll: function(e) {},
	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad(options) {
		var that = this;
		that.id = options.id
	},
	onShow() {},
	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {},
	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {},
	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {},
	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {},
	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {},
	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {
		return {
			title: uni.getStorageSync('setting').desc,
			path: '/pages/index/index?user=' + this.user,
			imageUrl: '',
			success: function(res) {
				console.log('success22:' + JSON.stringify(res));
			},
			fail: function(err) {
				console.log('fail22:' + JSON.stringify(err));
			}
		};
	},
	methods: {
		submit() {
			var that = this;
			var data = this.form;
			data['id'] = this.id;
			data['status'] = 2;
			data.token = uni.getStorageSync('token');
			request.get(`index.php?s=/api/sharp.order/verifyupdate&wxapp_id=` + uni.getStorageSync('web_id'), data).then(res => {
				if (res.data.code == 1) {
					uni.showToast({
						title: '审核成功'
					});
					setTimeout(() => {
						uni.navigateBack({});
					}, 1000);
				} else {
					uni.showToast({
						icon: 'none',
						title: res.data.msg
					});
				}
			});
		},
		textInput(e) {
			var field = e.currentTarget.dataset.field;
			this.form[field] = e.detail.value;
		},
		jumpzuo() {
			uni.navigateBack();
		}
	}
};
</script>

<style>
@import url('./create.css');
</style>
